package com.lagou.jdbc02;

import com.lagou.utils.JDBCUtils;
import org.junit.Test;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class TestDML {
    @Test
    public void testInsert() throws SQLException {
        Connection connection = JDBCUtils.getConnection();
        Statement statement = connection.createStatement();
        String sql = "insert into jdbc_user values(null,'haha','123','2020-12-15')";
        System.out.println("statement.executeUpdate(sql) = " + statement.executeUpdate(sql));
        JDBCUtils.close(connection, statement);
    }
}
